package freedom.easyit.service;

import java.io.FileNotFoundException;
import java.util.List;

import javax.mail.MessagingException;

import freedom.easyit.domain.ContactBook;
import freedom.easyit.domain.MailHistory;
import freedom.easyit.dto.ContactBookDto;

/**
 * @author Charlie Email:tingfangcao@163.com
 * @date 2020/10/20
 */
public interface MailService {

    /**
     * 发送邮件
     * @param to
     * @param subject
     * @param text
     * @throws FileNotFoundException 
     * @throws MessagingException 
     */
    void send(String to, String subject, String text, String signDate) throws FileNotFoundException, MessagingException;
    /**
     * 发送邮件
     * @param contactBook
     * @throws FileNotFoundException
     * @throws MessagingException
     */
    void send(ContactBook contactBook) throws FileNotFoundException, MessagingException;
    /**
     * 发送邮件
     * @param contactBook
     * @param check 检查重复发送
     * @throws FileNotFoundException
     * @throws MessagingException
     */
    void send(ContactBook contactBook, boolean check) throws FileNotFoundException, MessagingException;
    /**
     * 发送邮件
     * @throws FileNotFoundException 
     * @throws MessagingException 
     */
    void send() throws FileNotFoundException, MessagingException;

    /**
     * 保存通讯录
     * @param list
     */
    void save(List<ContactBookDto> list);


    /**
     * @return
     */
    List<ContactBook> listContactBook();

    /**
     * @return
     */
    List<MailHistory> listMailHistory10();
    /**
     * @param contactBookList
     * @throws FileNotFoundException
     * @throws MessagingException
     */
    void send(List<ContactBook> contactBookList) throws FileNotFoundException, MessagingException;
    /**
     * @param contactBookList
     * @param check
     * @throws FileNotFoundException
     * @throws MessagingException
     */
    void send(List<ContactBook> contactBookList, boolean check) throws FileNotFoundException, MessagingException;
}
